// 处理schema中的function
function handleFunction(obj) {
    if (!obj) {
        return obj
    }
    var jsonObj = obj.data || {}
    var json = JSON.stringify(jsonObj, function(key, value) {
      if (typeof value === "function") {
        return "/Function(" + value.toString() + ")/";
      }
      return value;
    });

    var jsonObj2 = JSON.parse(json, function(key, value) {
      if (typeof value === "string" &&
          value.startsWith("/Function(") &&
          value.endsWith(")/")) {
        value = value.substring(10, value.length - 2);
        return (0, eval)("(" + value + ")");
      }
      return value;
    });
    obj.data = jsonObj2

    return obj
}